#include "CGraphics.h"

CGraphics::CGraphics() {

}

CGraphics::~CGraphics() {
}

VOID CGraphics::Keydown(UCHAR key) {
	switch (key) {
	case 'A':
		_Player.Set(DirLeft, TRUE);
		break;
	case 'W':
		_Player.Set(DirUp, TRUE);
		break;
	case 'D':
		_Player.Set(DirRight, TRUE);
		break;
	case 'S':
		_Player.Set(DirDown, TRUE);
		break;
	}
}

VOID CGraphics::Keyup(UCHAR key) {
	switch (key) {
	case 'A':
		_Player.Set(DirLeft, FALSE);
		break;
	case 'W':
		_Player.Set(DirUp, FALSE);
		break;
	case 'D':
		_Player.Set(DirRight, FALSE);
		break;
	case 'S':
		_Player.Set(DirDown, FALSE);
		break;
	}
}

VOID CGraphics::DoFrame(int cxClient, int cyClient, HDC hdc) {
	_Map.Render(cxClient, cyClient, hdc);
	_Player.Render(cxClient, cyClient, hdc);
}

